<!DOCTYPE HTML><html><head><meta charset="utf-8"><meta name="viewport" content="maximum-scale=1,minimum-scale=1,user-scalable=0,width=device-width,initial-scale=1"><meta name="format-detection" content="telephone=no,email=no,date=no,address=no"><link rel="stylesheet" href="../../../global/css/aui.css"><link rel="stylesheet" href="../../../global/css/iconfont/iconfont.css"><link rel="stylesheet" href="../../../global/css/my-css.css"><style>body,html{ background: #fff; }
    /* .rank-linear-gradient{background: linear-gradient(to bottom ,#ec537b 10% , #d54491 20%)!important;} */
    .list{ border-top: 1px solid #f5f5f5; }
    /* .list:last-child{ border-bottom: 1px dashed transparent;} */

    .rank-index{font-family:PingFang-SC-Bold,PingFang-SC;color:#999;}
    .list:first-child .rank-index{color: #333;font-size: 1.2rem;}
    .list:nth-child(2) .rank-index{color: #333;font-size: 1.2rem;}
    .list:nth-child(3) .rank-index{color: #333;font-size: 1.2rem;}
    .list:first-child .rank-username{color:#EFB902}
    .list:nth-child(2) .rank-username{color:#FF994F}
    .list:nth-child(3) .rank-username{color:#AFC3DB}
    .itst-active{background: #f5f5f5;}
    .arrow{ width:10px;height:14px;display: inline-block; }</style></head><body><div id="vmMain" class="p-b20" v-cloak><div class="bg-white r5"><div v-for="(i,index) in list" :id="'nowid'+i.uid" class="flex p-t10 p-l15 p-b10 p-r15 align-center list" :class="i.itsu?'itst-active':''"><div class="rank-index s-20 flex-shrink w-20 t-c" style="font-family: 'DIN Alternate';">{{index+1}}</div><div tapmode @click="toUCenter(i)" class="p-l10 p-r10 relative"><img class="r100 img-d8" :class="index<3?'w-68 h-68':'w-58 h-58'" :src="i.user_info.avatar" alt=""> <img v-if="index<3" style="width: 3.85rem;height:3.85rem;position: absolute;top: -8px;left: 2px;" :src="'../../../global/image/active-user-rank'+(index+1)+'.png'" alt=""></div><div><div tapmode @click="toUCenter(i)" class="s-14 c-3 flex align-center"><span class="rank-username s-16 b">{{i.user_info.username}}</span><div style="margin-top: -3px;"><span class="m-l5" v-html="userLVGetHtml(i.user_info.level_score)"></span></div><img v-if="i.gender && i.gender!=0" class="auix-gender m-l3" style="width:0.75rem;height:0.7rem;" :src="'../../../global/image/gender'+i.gender+'.png'" alt=""></div><div class="s-12 c-9"><span>发帖 {{i.thread_count>10?'10':i.thread_count}}<span v-if="i.thread_count>10">+</span> </span><span class="m-l10">评论 {{i.post_count || 0}} </span><span class="m-l10">赞 {{i.like_count || 0}}</span></div></div><div v-if="showrank && i.user_info.uid == nowUid" style="padding-left: 30px;"><span v-if="detail.current_user_change > 0" class="rank-green s-16"><img class="arrow" src="../../../global/image/topic/active-up.png" alt=""> {{detail.current_user_change}} </span><span v-if="detail.current_user_change < 0" class="rank-red s-16"><img class="arrow" src="../../../global/image/topic/active-down.png" alt=""> {{Math.abs(detail.current_user_change)}}</span></div></div></div></div></body><script src="../../../config.js"></script><script src="../../../global/script/lib/api.js"></script><script src="../../../global/script/lib/aui-tab.js"></script><script src="../../../global/script/lib/doT.min.js"></script><script src="../../../global/script/lib/vue.min.js"></script><script src="../../../global/script/libx/auix-solo.js"></script><script src="../../../global/script/libx/myPic.js"></script><script src="../../../global/script/libx/myAlbumBrowser.js"></script><script src="../../../global/script/libx/myCompact.js"></script><script src="../../../global/script/comp/oneMediaUploader.js"></script><script src="../../../global/script/libx/myMediaScanner.js"></script><script src="../../../global/script/gVueMixin.js"></script><script src="../../../global/script/mylib.js"></script><script src="../../../app.js"></script><script>apiready = function () {
        window.app.init4Frm();
        initVm();
        window.ctxSwt = {
            postY: 0,
            cmtY: 0,
            separ2: 0,
        };
    }
    var vm ;
    function initVm(){
        gVueMixin();
        vm = new Vue({
            el: '#vmMain',
            data: {
                list:[],
                detail:{},
                nowUid:'',
                showrank:false,
            },
            mounted:function(){
                this.load();
                this.nowUid = app.auth.getMyId();
            },
            methods: {
                load: function () {
                    var that = this;
                    addPageLoading();
                    var data = {
                        viewer_id:app.auth.getMyId(),  // 当前用户ID  可选
                        viewer_gid:app.getGId(),  // 当前用户城市ID  必选
                        fetch_list:true,
                    };
                    gateway_user_center('get_user_active_rank', data, {
                        always: function() {
                            utils.rmAnyLoading();
                        },
                        succ: function(json) {

                            // 加载完列表，发pv，把列表中的各uid传过去
                            sendEvent("pv", {
                                page: api.winName,
                                refer: api.pageParam.refer,
                                action: "browse",
                                object: "list",
                                obj_list: function () {
                                    if (json && json.rank && typeof json.rank.length == 'number') {
                                        var uids = json.rank.reduce(function (arr, it) {
                                            arr.push(it.uid);
                                            return arr;
                                        }, []);

                                        return JSON.stringify(uids);
                                    }
                                    return '[]';
                                }(),
                                resolution: api.screenWidth + '*' + api.screenHeight,
                                operator: api.operator,
                                nettype: api.connectionType
                            });

                            for(var i=0;i<json.data.rank.length;i++){
                                json.data.rank[i].itsu = false;
                            }
                            that.list = json.data.rank;
                            that.detail = json.data;
                            var js = makeExecScriptCallee('showFooterRank', json.data);
                            api.execScript({
                                script: js
                            });
                            $api.addCls($api.dom('html'),'rank-linear-gradient');
                            $api.addCls($api.dom('body'),'rank-linear-gradient');
                        },
                        fail: function(err, url) {
                            utils.postErrWithTips(err, url);
                        }
                    });
                },
                toUCenter:function(val){
                    if (0 == val.uid) return;
                    views.openUCenterWin(val.uid);
                }
            }
        })
    }
    // 定位到你的排名位置
    function toURankFrm(uid){
        for(var i=0;i<vm.list.length;i++){
            if(vm.list[i].uid == uid){
                vm.list[i].itsu = true;
            }
        }
        var dom = $api.byId('nowid'+uid);
        if(dom){
            var separ = $api.offset($api.byId('nowid'+uid)).t;
            if (0 == window.ctxSwt.cmtY) {
                window.ctxSwt.cmtY = separ;
                window.ctxSwt.separ2 = separ;
            }

            var y = curY();
            var toY = 0;

            if (y >= separ || y >= window.ctxSwt.separ2) {
                window.ctxSwt.cmtY = y;
                toY = window.ctxSwt.postY;
            } else {
                window.ctxSwt.postY = y;
                toY = window.ctxSwt.cmtY;
            }
            toY = toY - 100;
            animToY(toY);
            vm.showrank = true;
        }
    }
    document.addEventListener("touchstart",function(){
        for(var i=0;i<vm.list.length;i++){
            vm.list[i].itsu = false;
        }
        vm.showrank = false;
    });</script></html>